<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#bigbody{margin:auto; width:750px; height:auto; overflow:hidden; border:1px solid #CCCCCC; padding:10px;}
.small_img_body{ margin:auto; width:730px; height:120px;}
.bigprevlabel{
    float:left;
	width:12px;
    height:120px;
	background:url(images/movebar.jpg) no-repeat 1px 30px;
    cursor:pointer;
}
.bignextlabel{
    float: left;
	width:12px;
    height:120px;
	background:url(images/movebar.jpg) no-repeat -13px 30px; 
    cursor:pointer;
}
.big_list_img{
    float:left;
    width:680px;
    overflow:hidden;
    position:relative;
    height:110px;
}
#zxx_test_box{ margin:auto;}

.pic_small{
	float:left;
	text-align:left;
	width:1000%;
	position:absolute;
	left: 4px;
	top: -4px;
	padding:2px 0 2px 3px;
	height:110px;
}
.pic_small a {
	float:left;
	margin:5px 4px 0 2px;
	width:100px;
	padding:2px;
	height:100px;
	text-align:center;
	text-decoration:none;
	border:1px solid #DEDEDE;
	FILTER:Alpha(Opacity=80);
	opacity:0.8;
}
.pic_small img{
	 width:100px;
	 height:100px;
	 border:0px;
}

.pic_chg_box{ margin:auto; width:680px; height:552px;  margin:20px 0 0 20px;}
.pic_in_area{width:680px; text-align:center; margin:0; padding:10px 0 0 0; list-style-type:none;}
.pic_in_area li{ width:700px; height:512px; *float:left; *font-size:449px; vertical-align:middle; background:#fff url(images/loading.gif) center center no-repeat;}
.pic_in_area li img{vertical-align:middle;}
.close_pic{ margin:auto; width:700px; height:22px; background:url(images/closelabel.gif) no-repeat 600px 0px;}
</style>
<script type="text/javascript" language="javascript" src="Js/jquery-1.3.1.js" ></script>
<script type="text/javascript" language="javascript">
	jQuery.fn.loadthumb = function(options) {
		options = $.extend({
			 src:""
		},options);
		var _self = this;
		_self.hide();
		var img = new Image();
		$(img).load(function(){
			_self.attr("src", options.src);
			_self.fadeIn("slow");
		}).attr("src", options.src); 
		return _self;
	}
$(function(){
  var i = 6;  //已知显示的<a>元素的个数
  var m = 6;  //用于计算的变量
  var $content = $(".big_list_img");
  var count = $content.find("a").length;
  $(".bignextlabel").live("click",function(){
		var $scrollableDiv = $(this).siblings(".big_list_img").find(".pic_small");
		if( !$scrollableDiv.is(":animated")){  
			if(m<count){  
				m++;
				$scrollableDiv.animate({left: "-=116px"}, 600);
			}
			else
			{
				$(".bignextlabel").attr({title: "已经最后一张了"}); 
				$(".bignextlabel").css({"opacity":"0.5"});
				$(".bigprevlabel").css({"opacity":"1.0"});  
			}				
		}
		return false;
  });
   //上一张
  $(".bigprevlabel").live("click",function(){
		var $scrollableDiv = $(this).siblings(".big_list_img").find(".pic_small");
		if( !$scrollableDiv.is(":animated")){
			if(m>i){ 
				m--;
				$scrollableDiv.animate({left: "+=116px"}, 600);
			}
			else
			{
				$(".bigprevlabel").attr({title: "已经是第一张了"}); 
				$(".bigprevlabel").css({"opacity":"0.5"});
				$(".bignextlabel").css({"opacity":"1.0"});   
			}
		}
		return false;
});

$(".pic_small a").eq(0).css({"margin":"4px 3px 0 1px","padding":"2px","border":"2px solid #A1D215"});

$(".pic_small a").hover(
  function(){
   $(this).css({"margin":"4px 3px 0 1px","padding":"2px","border":"2px solid #A1D215"}).siblings().css({"margin":"5px 4px 0 2px","padding":"2px","border":"1px solid #DEDEDE"});
	var src = "images/pro/big/" + $(this).attr("href");
	//$("#large img").hide().attr({"src": $(this).attr("href"), "title": $("> img", this).attr("title")});
	$(this).parents("#bigbody").find(".myImg").loadthumb({src:src}).attr("src",src);
	return false;
  },
  function(){
    $(this).css({"margin":"4px 3px 0 1px","padding":"2px","border":"2px solid #A1D215","opacity":"1.0"}); 	
  });
});

</script>
</head>
<body>
<div id="bigbody">
	<div id="zxx_test_box">
        <div class="small_img_body">
        <div class="bigprevlabel"></div>
        <div class="big_list_img">
            <div class="pic_small">
                <a href="mm1.jpg"><img src="images/pro/small/mm1.jpg" alt="" /></a>
                <a href="mm2.jpg"><img src="images/pro/small/mm2.jpg" alt=""/></a>
                <a href="mm3.jpg"><img src="images/pro/small/mm3.jpg" alt=""/></a>
                <a href="mm4.jpg"><img src="images/pro/small/mm4.jpg" alt=""/></a>
                <a href="mm5.jpg"><img src="images/pro/small/mm5.jpg" alt=""/></a>
                <a href="mm6.jpg"><img src="images/pro/small/mm6.jpg" alt=""/></a>
                <a href="mm7.jpg"><img src="images/pro/small/mm7.jpg" alt=""/></a>
                <a href="mm8.jpg"><img src="images/pro/small/mm8.jpg" alt=""/></a>
                <a href="mm9.jpg"><img src="images/pro/small/mm9.jpg" alt="" /></a>
             </div>
        </div>
        <div class="bignextlabel"></div>
        </div> 
      
        <div class="pic_chg_box">
        <ul class="pic_in_area" id="pic_chg_area">
            <li><img class="myImg" src="images/pro/big/mm9.jpg" /></li>
        </ul>
      </div>
      <div class="close_pic"></div> 
    </div>   
</div>
</body>
</html>
